wxapp.SendMsg = {
    sendMsg: function(s) {
        s.params || (s.params = {}), s.params.userId = s.params.userId || tywx.UserInfo.userId, 
        s.params.gameId = s.params.gameId || tywx.SystemInfo.hallId, s.params.clientId = tywx.SystemInfo.clientId, 
        wxapp.logic.socket.sendMsg(s);
    },
    sendHeartBeat: function() {
        var s = {
            cmd: tywx.EventType.CMD_HEART_BEAT,
            params: {
                deviceId: tywx.SystemInfo.deviceId
            }
        };
        this.sendMsg(s);
    },
    bindUser: function(s) {
        var e = {
            cmd: tywx.EventType.CMD_BIND_USER,
            params: {
                authorCode: tywx.UserInfo.authorCode,
                inviter: s
            }
        };
        this.sendMsg(e);
    },
    sendShareClick: function(s, e) {
        var a = {
            cmd: "user",
            params: {
                gameId: wxapp.Const.tyGameId,
                userId: wxapp.appData.userInfo.userId,
                action: "fish_share_click",
                shareId: parseInt(s),
                shareUserId: parseInt(e)
            }
        };
        this.sendMsg(a);
    }
};